import React, { PureComponent } from 'react'
import { Navigate } from 'react-router-dom'
export default class User extends PureComponent {
  constructor(props) {
    super(props)

    this.state = {
      isLogin: true
    }
  }
  render() {
    return this.state.isLogin ? (
      <div>
        <h2>User:</h2>
        <p>用户名:</p>
      </div>
    ) : (
      <Navigate to="/login" />
    )
  }
}
